package com.wordplat.quickstart.xutils.http.app;

import com.wordplat.quickstart.xutils.http.request.UriRequest;

/**
 * Created by wyouflf on 15/11/10.
 * 拦截请求响应(在后台线程工作).
 * <p>
 * 用法:
 * 1. 请求的callback参数同时实现RequestInterceptListener
 * 2. 或者使用 @HttpRequest 注解实现ParamsBuilder接口
 *
 * @since 2021-05-09
 */
public interface RequestInterceptListener {
    /**
     * beforeRequest
     *
     * @param request
     * @throws Throwable
     */
    void beforeRequest(UriRequest request) throws Throwable;

    /**
     * afterRequest
     *
     * @param request
     * @throws Throwable
     */
    void afterRequest(UriRequest request) throws Throwable;
}